package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.model.BCompanyUser;

import java.util.List;

/**
 * The interface B company user service.
 *
 * @FileName: cn.huiyunche.service.base.interfaces
 * @Description: 企业用户关联
 * @author: Aaron
 * @date: 2016 /10/27 下午1:51
 */
public interface BCompanyUserService {

    /**
     * Gets company id by user id.
     *
     * @param userId the user id
     * @return the company id by user id
     */
    Long getCompanyIdByUserId(Long userId);

    /**
     * Gets company by user id.
     *
     * @param userId the user id
     * @return the company by user id
     */
    BCompanyUser getCompanyByUserId(Long userId);

    /**
     * Gets list by company id.
     *
     * @param companyId the company id
     * @return the list by company id
     */
    List<BCompanyUser> getListByCompanyId(Long companyId);

    /**
     * Gets list by division id.
     *
     * @param divisionId the division id
     * @return the list by division id
     */
    List<BCompanyUser> getListByDivisionId(Integer divisionId);

    /**
     * current user is base user
     * @return
     * @throws Exception
     */
    Boolean isBaseUser() throws Exception;

    /**
     * Is Base User By userId
     * @param userId
     * @return
     * @throws Exception
     */
    Boolean isBaseUser(Long userId) throws Exception;
}
